package com.util;

import java.util.ArrayList;
import java.util.List;

import com.bean.Users;

public class ListObject {
	private List list = new ArrayList();
	
	public List getUserList(Users user){
		String[] useridArry = user.getUserid().toString().split(",");
		String[] usernameArry = user.getUsername().split(",");
		String[] passwordArry = user.getPassword().split(",");
		for(int i=0;i<usernameArry.length;i++){
			Users u = new Users();
			u.setUserid(Integer.getInteger(useridArry[i].trim()));
			u.setUsername(usernameArry[i].trim());
			u.setPassword(passwordArry[i].trim());
			list.add(u);
		}
		return list;
	}
	
	public Object getAttrValue(String str){
		if(str == ""){
			return null;
		}else{
			return str;
		}
		
	}
}
